home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / D-F / FSP 2.6 / FSP Control.GlassellPk.2.3 < prev    next >
Encoding:
Text File  |  1990-07-01  |  5.2 KB  |  200 lines  |  [TEXT/NISI]

  1. * This is an FSP 2.3 compatible control file.
  2. * It has since been superceded by newer versions that
  3. * take advantage of new FSP capabilities.  -- Tom Konantz
  4. *
  5. ;  File Section Maintenance Script
  6. ;   written by Pete Johnson
  7. ;    for the Glassell Park BBS
  8. ;     (213) 258-7649
  9. ;
  10. ;  Define path to prefix filesecs
  11. ;
  12. DEFINE "GP" "Glass:BBS:Files"
  13. ;
  14. ;  The Glassell Park BBS is set up with all files in the following
  15. ;  path -- Glass:BBS:Files: -- followed by a specific file folder.
  16. ;  Each file folder is named for its contents -- Comm, Fonts, Text etc.
  17. ;  If we're in the Comm: folder, we'll see three file directories:
  18. ;  *New, *Comm and *Comm.c
  19. ;  Uploads go to *New. *Comm contains an alphabetically sorted list of
  20. ;  files. *Comm.c contains the same list of files, sorted new -> old.
  21. ;  Each file section is loaded (using alpha-sort version)...
  22. ;  its filepath is reset...
  23. ;  it's sorted by date (in new -> old order)...
  24. ;  and the result is written to the file section with a ".c" suffix...
  25. ;  then it's sorted by filename...
  26. ;  and the result overwrites the original file section.
  27. ;
  28. ;  But first we'll purge deleted file entries from the private
  29. ;  and new sections, if in non-remote mode. In the process, we kill
  30. ;  any files which have been deleted in the *New directory but which
  31. ;  haven't been moved into the corresponding download directory (clean
  32. ;  up for garbage uploads).
  33. ;
  34. ;
  35. DEFINEMACRO "Clean"
  36. CONCATENATE "@3"  "GP:"  "@1"  ; i.e. Glass:BBS:Files:DeskAcc
  37. CONCATENATE "@3"  "@3:*" "@1"  ; i.e. Glass:BBS:Files:DeskAcc:*DeskAcc
  38. CONCATENATE "@1"  "GP:"  "@1"  ; i.e. Glass:BBS:Files:DeskAcc
  39. CONCATENATE "@1"  "@1:"  "@2"  ; i.e. Glass:BBS:Files:DeskAcc:*New
  40. LOAD  "@1"
  41. SUBTRACT "@3"         ;  Eliminate *New entries which have moved
  42. PURGE/DELETE          ;   and kill remaining entries marked deleted.
  43. CHECK/PATH
  44. PURGE
  45. SAVE "@1"
  46. ENDMACRO
  47. ;
  48. Clean "Business" "*New"
  49. Clean "Comm"     "*New"
  50. Clean "DeskAcc"  "*New"
  51. Clean "Fonts"    "*New"
  52. Clean "Fx"       "*New"
  53. Clean "Games"    "*New"
  54. Clean "Graph"    "*New"
  55. Clean "Hyper"    "*New"
  56. Clean "Illus"    "*New"
  57. Clean "Mac2"     "*New"
  58. Clean "Music"    "*New"
  59. Clean "Program"  "*New"
  60. Clean "Songs"    "*New"
  61. Clean "Text"     "*New"
  62. Clean "TN"       "*New"
  63. Clean "Utility"  "*New"
  64. ;
  65. ;  Special macro for simple directories (those where uploads go to same
  66. ;  directory as downloads).
  67. ;
  68. DEFINEMACRO "Simple"
  69. CONCATENATE "@2" "GP:" "@1"
  70. CONCATENATE "@2" "@2:*" "@1"
  71. LOAD "@2"
  72. PURGE/DELETE
  73. CHECK/PATH
  74. PURGE
  75. SAVE "@2"
  76. ENDMACRO
  77. ;
  78. Simple "Private"
  79. ;
  80. ; The Tech Notes section gets a special routine since it doesn't need
  81. ; a reverse chronological sort. Tech notes contents don't change often
  82. ; so I use Host's built-in "read new to old" FileSection command.
  83. ;
  84. ;END
  85. ;
  86. LOAD "GP:TN:*TN"
  87. SETPATH "GP:TN:"
  88. PURGE/DELETE
  89. CHECK/PATH
  90. PURGE
  91. SORT/TITLE
  92. SAVE "GP:TN:*TN"
  93. SAVETEXT/DESC "GP:TN.txt"
  94. ;
  95. * Next
  96. ;
  97. ;  If we're not in remote mode, we also delete files referenced by deleted
  98. ;  FileSection entries, check for valid paths on every entry and purge the
  99. ;  entries marked for deletion. This is not done via remote, because it
  100. ;  takes too much time.
  101. ;
  102. DEFINEMACRO "Shuffle"
  103. CONCATENATE "@2" "GP:" "@1:"     ;  i.e. GP:Comm:
  104. CONCATENATE "@3" "@2*" "@1"      ;  i.e. GP:Comm:*Comm
  105. LOAD "@3"
  106. SETPATH "@2"
  107. PURGE/DELETE
  108. CHECK/PATH
  109. PURGE
  110. SORT/DATE
  111. SAVE "@3.c"
  112. SORT/TITLE
  113. SAVE "@3"
  114. ENDMACRO
  115. ;
  116. Shuffle "Business"
  117. Shuffle "Comm"
  118. Shuffle "DeskAcc"
  119. Shuffle "Fx"
  120. Shuffle "Fonts"
  121. Shuffle "Games"
  122. Shuffle "Graph"
  123. Shuffle "Hyper"
  124. Shuffle "Illus"
  125. Shuffle "Mac2"
  126. Shuffle "Music"
  127. Shuffle "Program"
  128. Shuffle "Songs"
  129. Shuffle "Text"
  130. Shuffle "Utility"
  131. ;
  132. ;  Now we want to make an aggregate file containing all the sections.
  133. ;  We already have the Utility section sorted alphabetically in memory.
  134. ;
  135. ;  We add all other sections, also sorted alphabetically...
  136. ;
  137. ;  Then get a path list to compare for maintenance.
  138. ;  Then we sort the whole thing alphabetically by filename...
  139. ;  and write the result into a master directory...
  140. ;  and a textfile.
  141. ;
  142. DEFINEMACRO "Collect"
  143. CONCATENATE "@2" "GP:" "@1:*"     ;  i.e. GP:Comm:*
  144. CONCATENATE "@2" "@2"  "@1"       ;  i.e. GP:Comm:*Comm
  145. ADD "@2"
  146. ENDMACRO
  147. ;
  148. ;  If we're in remote mode, we skip the next section -- too much time.
  149. ;
  150. SKIP "* Here" "Remote"
  151. ;
  152. Collect "Text"
  153. Collect "Songs"
  154. Collect "Program"
  155. Collect "Music"
  156. Collect "Mac2"
  157. Collect "Illus"
  158. Collect "Hyper"
  159. Collect "Graph"
  160. Collect "Games"
  161. Collect "Fx"
  162. Collect "Fonts"
  163. Collect "DeskAcc"
  164. Collect "Comm"
  165. Collect "Business"
  166. ;
  167. SAVETEXT/PATH "GP:*All.path"   ;  for board maintenance
  168. ;
  169. ;  The next line adds listing of All Files to downloads, so callers can
  170. ;  download directory contents. It's a FileSection with one entry
  171. ;  pointing to the *All.txt file we're about to make. I dated the entry
  172. ;  into the future, so it shows at the top of both the chronological
  173. ;  and alphabetical *All file lists.
  174. ;
  175. ADD "GP:*Misc"
  176. SORT/TITLE
  177. SAVE "GP:*All"
  178. FORMAT "TITLE+SIZEK+DESC"
  179. SAVETEXT/FORMAT "GP:*All.txt"
  180. SORT/DATE
  181. SAVE "GP:*All.c"
  182. ;
  183. * Here
  184. ;
  185. ;  The *Best directory gets its own routine after all else is done. It's a
  186. ;  "Greatest Hits" listing pointing to files in various other sections, so
  187. ;  I don't mess with the path information, except to verify it.
  188. ;
  189. CONCATENATE "@1" "GP:" "*Best"
  190. LOAD "@1"
  191. CHECK/PATH
  192. PURGE
  193. SORT/DATE
  194. SAVE "@1.c"
  195. SORT/TITLE
  196. SAVE "@1"
  197. ;
  198. LAUNCH "Host" "Remote"
  199. END